home *** CD-ROM | disk | FTP | other *** search
/ CyberMycha 2008 January / Cybermycha 1_2008.iso / Data.cab / _AD563FC9348441F0B3AAA699339BB858 < prev    next >
Encoding:
Text File  |  2004-03-18  |  837 b   |  36 lines

  1. regc4f( 5, %daycolor_r, %daycolor_g, %daycolor_b, %sunvisibility )
  2. regc4f( 7, %ambient_r, %ambient_g, %ambient_b, %ambient_a )
  3.  
  4. pshader("
  5.  
  6. ps_1_1
  7.  
  8. def c1, 0, 1, 0, 0
  9.  
  10. tex t0 ;Terrain color
  11. tex t1 ;Terrain details
  12. tex t2 ;Clouds
  13. tex t3 ;Road
  14.  
  15. dp3 r0.rgb, c1, t1
  16.  
  17. mul r0.rgb, t0, r0 ;kolor * detal
  18. +mov_x4_sat r0.a, t3.a
  19.  
  20. lrp r0.rgb, r0.a, t3, r0 ;blendowanie tekstury obiektu i terenu
  21. +mul r0.a, t0.a, 1-t2.a ;lightmapa terenu * Chmury
  22.  
  23. mad_sat r1.rgb, r0.a, c7, c7.a ;skalowanie oswietlenia (dodanie ambientu)
  24. +mul r1.a, t3_bx2.a, r0.a ; maska do speculara
  25.  
  26. mul r1.a, r1.a, c5.a ; maska do speculara
  27.  
  28. mad_sat r0, r1.a, v1, r0 ;wyciecie speculara maska i dodanie do mapy koloru
  29.  
  30. mul r1, r1, c5 ;wymnozenie oswietlenia przez kolor pory dnia/swiatla
  31.  
  32. mul r0, r0, r1 ;mnozymy kolory przez oswietlenie
  33.  
  34. ")
  35.  
  36.